﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
	<meta charset="utf-8" />
    <!--引用js、css-->
    <script src="~/CommonResource/Js/jquery-1.8.3.min.js"></script>
    <script src="~/CommonResource/Js/ajaxfileupload.js"></script>
    <script src="~/CommonResource/Js/json2.js"></script>
    <script>
        $(function () {
            var fileElementId = "myFile";
            $('#myFile').on('change', function () {
                var url = "../../Ashx/UploadFiles.ashx";
                var params = {};
                params.action = "FileUpload";
                params.fileMaxMB = "5";
                params.fileExtendName = ".zip";
                params.uploadPath = "/UpLoad/";
                params.isCompress = "0";
                $.ajaxFileUpload({
                    url: url,
                    data: params,
                    type: "POST",
                    fileElementId: fileElementId,
                    dataType: "text/html",
                    success: function (data, status) {
                        var dataObj = JSON.parse(data);
                        var msg = "";
                        if (dataObj.OperateResult == "调用成功") {

                        }
                    },
                    error: function (data, status, e) {

                    }
                });
            });
        });
    </script>
</head>
<body>
    <input type="file" name="myFile" id="myFile" multiple="multiple" />
</body>
</html>
